package com.zusmart.core.config;

import java.io.InputStream;
import java.util.Map;

public interface ConfigSourceManager {

	public void attachConfigSource(ConfigSource configSource);

	public void attachConfigSource(InputStream inputStream, String fileName, String fileExtension);

	public void attachConfigSourceConverter(ConfigSourceConverter configSourceConverter);

	public void attachConfigDataConverter(ConfigDataConverter<?> configDataConverter);

	public Map<String, ConfigSource> getConfigSourceMapping();

	public Map<String, ConfigSourceConverter> getConfigSourceConverterMapping();

	public Map<Class<?>, ConfigDataConverter<?>> getConfigDataConverterMapping();

	public boolean isSupportConfigDataType(Class<?> configDataType);

	public ConfigData<Integer> getIntegerConfigData(String configName, Integer defaultData);

	public ConfigData<Integer> getIntegerConfigData(String configName);

	public ConfigData<String> getStringConfigData(String configName, String defaultData);

	public ConfigData<String> getStringConfigData(String configName);

	public ConfigData<Boolean> getBooleanConfigData(String configName, Boolean defaultData);

	public ConfigData<Boolean> getBooleanConfigData(String configName);

	public ConfigData<Short> getShortConfigData(String configName, Short defaultData);

	public ConfigData<Short> getShortConfigData(String configName);

	public ConfigData<Long> getLongConfigData(String configName, Long defaultData);

	public ConfigData<Long> getLongConfigData(String configName);

	public ConfigData<Double> getDoubleConfigData(String configName, Double defaultData);

	public ConfigData<Double> getDoubleConfigData(String configName);

	public ConfigData<Float> getFloatConfigData(String configName, Float defaultData);

	public ConfigData<Float> getFloatConfigData(String configName);

	public <T> ConfigData<T> getConfigData(Class<T> dataType, String configName, T defaultData);

	public <T> ConfigData<T> getConfigData(Class<T> dataType, String configName);

}